package com.woniu.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
@ApiModel("修改学生用户数据")
public class UpdateUserStuInfoForm implements Serializable {
    @Min(value = 1, message = "id必须为正整数")
    @Max(value = 999, message = "id不能超过3位")
    private String userId;
    @NotNull(message = "手机号不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    @ApiModelProperty("手机号")
    private String userPhone;
    @ApiModelProperty("居住地址")
    @NotNull(message = "居住地址不能为空")
    private String userAddress;
    @ApiModelProperty("默认收货地址id")
    @Min(value = 1, message = "默认收货地址id必须为正整数")
    @Max(value = 999, message = "默认收货地址id不能超过3位")
    private String userAddressId;
    @ApiModelProperty("区域id")
    @Min(value = 1, message = "区域id必须为正整数")
    @Max(value = 999, message = "区域id不能超过3位")
    private Integer areaCodeId;


}
